using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;
using System.IO; 


namespace GAscheduler
{
	static class PeriodManager
	{
        static List<Period> Periods = new List<Period>();

        public static void LoadCSV(string filename)
		{
			StreamReader readFile = new StreamReader(filename);

      			string line;
     			string[] row;
                string[] days;

      			while ((line = readFile.ReadLine()) != null)
     			{
        			row = line.Split(',');
        			days = row[1].Split(' ');
                    Periods.Add(new Period(row[0], row[2], days));
      			}
		}

        public static int Length()
		{
			return Periods.Count;
		}
    
        public static Period get(int i)
        {
            return Periods[i];  
        }


	}
}
